\begin{tikzpicture}[>=Stealth, scale=0.6]
    % 绘制两组坐标轴
    \pgfmathsetmacro{\base}{4 * pi}
    \foreach \y in {0, 4} {
        \draw [dashed] (-\base-0.3, \y+1) -- (\base+0.3, \y+1);
        \draw [->] (-\base-0.5, \y) -- (\base+0.5, \y) node[anchor=west] {$x$};
        \draw [dashed] (-\base-0.3, \y-1) -- (\base+0.3, \y-1);
        \draw [->] (0, \y-1.5) -- (0, \y+1.9) node[anchor=east] {$y$};
        \node [font=\footnotesize] at (0.3, \y-0.3) {$O$};
        \node [font=\footnotesize] at (0.3, \y+1.3) {$1$};
        \node [font=\footnotesize] at (0.4, \y-1.3) {$-1$};
        \foreach \x / \name in {-4*pi/$-4\pi$, -3*pi/$-3\pi$, -2*pi/$-2\pi$, -1*pi/$-1\pi$, pi/$\pi$, 2*pi/$2\pi$, 3*pi/$3\pi$, 4*pi/$4\pi$} {
            \node [anchor=north, font=\footnotesize] at (\x, \y) {\name};
        }
    }
    \foreach \x in {-3.5, -2.5, ..., 3.5} {
        \draw (\x * pi, 4) -- (\x * pi, 4+0.2);
    }
    \foreach \x in {-4, -3, ..., 4} {
        \draw (\x * pi, 0) -- (\x * pi, 0.2);
    }

    \draw[domain=-4*pi:4*pi,samples=100] plot (\x, {4 + sin(\x r)}) +(-3*pi, 1.6) node {$y = \sin x \quad x \in R$};
    \draw[domain=-4*pi:4*pi,samples=100] plot (\x, {cos(\x r)}) +(-3*pi, 0.6) node {$y = \cos x \quad x \in R$};
\end{tikzpicture}
